{% extends 'no_login_base.html' %}
{% load i18n allauth account %}
{% load crispy_forms_tags %}

{% block content %}
<form class="card card-md" method="post">
  <div class="card-body">
    <h2 class="card-title text-center mb-4">{% translate "Forgot password" %}</h2>
    {% if user.is_authenticated %}
      {% include "account/snippets/already_logged_in.html" %}
    {% endif %}
    <p> {% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}</p>
    <div class="mb-3">
      {% csrf_token %}
      {{ form|crispy }}
    </div>
    <div class="form-footer">
      <button type="submit" href="#" class="btn btn-primary w-100">
        <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><rect x="3" y="5" width="18" height="14" rx="2" /><polyline points="3 7 12 13 21 7" /></svg>
        {% translate "Send me a reset link" %}
      </button>
    </div>
  </div>
</form>
<div class="text-center text-muted mt-3">
  <a href="{% url 'account_login' %}">{% translate "Go back to the log in screen" %}</a>
</div>
{% endblock %}
